package com.heima.article.controller;


import com.heima.article.dto.ArticleDto;
import com.heima.article.service.IApArticleContentService;
import com.heima.common.dto.ResponseResult;
import io.swagger.annotations.Api;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * APP已发布文章内容表 前端控制器
 * </p>
 *
 * @author syl
 * @since 2022-06-29
 */
@RestController
@RequestMapping("/api/v1/article_content")
@Api(tags = "APP已发布文章内容表接口")
@CrossOrigin
public class ApArticleContentController{

    @Autowired
    private IApArticleContentService apArticleContentService;
   /**
    * @description: 保存文章
    * @author: wangjian
           * @date: 2022/7/2 18:39
    * @param: dto
    * @return: com.heima.common.dto.ResponseResult<java.lang.Long>
    **/
    @PostMapping
    public ResponseResult<Long> saveArticle(@RequestBody ArticleDto dto){
        return apArticleContentService.saveArticle(dto);
    }


}
